<?php
/**
 * 默认控制器，方法里面代码可以删除
 */
class IndexControl extends CommonControl{
	public function index(){
		
		$this->display();
	}

	/**
	 * [welcome 欢迎界面]
	 * @return [type] [description]
	 */
	public function welcome(){
		// var_dump($_SERVER);
		$sql_info=C('DB_NAME');
		// 从数据库获得登陆时间和登陆ip
		$sql_info1=M('admin')->where('aid='.$_SESSION['aid'])->field('logintime,loginip')->find();
		if(!is_null($sql_info1)){
			$sql_info1['db_name']=$sql_info;
		$this->assign('info',$sql_info1);
		$this->display();
		}
		
	}
}